package org.corolla.cloth.compute;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import org.corolla.cloth.entity.Accessory;


public class ComputeAccessory {
	
	
	/**
	 * 获取所有辅料的价格
	 * @author ZJD
	 * @param accessoryMap
	 * @return
	 */
	public static double getAccessory(Set<Accessory> accessorySet){
		double totalPrice = 0.0d;
		Iterator iterator = accessorySet.iterator(); 
		while(iterator.hasNext()){
			Accessory accessory = (Accessory) iterator.next();
			totalPrice = totalPrice + accessory.getTotalPrice();
		}
		return totalPrice;
	}

}
